(function() {
    angular.module('app').controller('monitorCtrl', monitorCtrl);

    monitorCtrl.$inject = ['util'];

    function monitorCtrl(util) {
        var vm = this;

        vm.productCount = 0;
        vm.shopCount = 0;
        vm.brandCount = 0;

        vm.tab = {
            cur: 'product',
            tabSelect: function(_tab) {
            	if(this.cur === _tab){
            		return;
            	}
                this.cur = _tab;
                util.$localStorage().set('monitor_tab', _tab);
            }
        };

        if (util.$localStorage().has('monitor_tab')) {
            console.log('$to');
            vm.tab.cur = util.$localStorage().get('monitor_tab');
        }



    }
})();
